/** When your routing table is too long, you can split it into small modules**/

import Layout from '@/layout'

const systemRouter = {
  path: '/system',
  component: Layout,
  redirect: 'noRedirect',
  name: 'System',
  alwaysShow: true,
  meta: {
    title: '系统管理',
    icon: 'system',
    permission: '/sys'
  },
  children: [
    {
      path: 'user',
      component: () => import('@/views/system/user'),
      name: 'User',
      meta: { title: '用户管理', icon: 'user', noCache: true, permission: '/sys/user' }
    },
    {
      path: 'role',
      component: () => import('@/views/system/role'),
      name: 'Role',
      meta: { title: '角色管理', icon: 'role', noCache: true, permission: '/sys/role' }
    },
    {
      path: 'permission',
      component: () => import('@/views/system/permission'),
      name: 'Permission',
      meta: { title: '权限管理', icon: 'password', noCache: false, permission: '/sys/permission' }
    },
    {
      path: 'dict',
      component: () => import('@/views/system/dict/index'),
      name: 'Dict',
      meta: { title: '字典管理', icon: 'dict', noCache: false, permission: '/sys/dict' }
    },
    {
      path: 'dictData',
      component: () => import('@/views/system/dict/data'),
      name: 'DictData',
      hidden: true,
      meta: { title: '字典列表', icon: 'dict', noCache: true, permission: '/sys/dict' }
    },
    {
      path: 'wxMenu',
      component: () => import('@/views/system/wx/menu'),
      name: 'WxMenu',
      meta: { title: '公众号菜单管理', icon: 'wechat', noCache: true, permission: '/sys/wx' }
    }
  ]
}

export default systemRouter
